Repository navigation
test: cover enum, array, and JSONB columns in the sample and fixtures - #54
Merged
omer-cengel merged 2 commits intoSep 29, 2026
Merged
Conversation
A new migration adds a book_format enum, a TEXT[] tags column, and a JSONB details column to books. The sample inserts a cataloged book and reads it back by format, and the release script applies the migration, resets the enum type, and expects the shared BookFormat enum and BooksRow record in every generation.
omer-cengel
deleted the
chore/enum-array-jsonb-sample-and-booktest-tests
branch
September 29, 2026 18:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the external sample and the PostgreSQL integration tests so that enum, array, and JSONB columns are generated, compiled, and executed end to end, including schema and query shapes modeled on sqlc's
booktestexample.Changes
book_formatenum and addsformat,tags TEXT[], anddetails JSONBcolumns tobooks.CreateCatalogedBookandListBooksByFormat, generate a sharedBooksRowrecord and a top-levelBookFormatenum; the sample application inserts a cataloged book and reads it back by format, checking the enum, the tag list, and the normalized JSONB text.scripts/verify-release.shresets the enum type, applies the new migration, and expects the sharedBookFormatandBooksRowfiles, the updated source counts and manifest, and the new repository methods.booktest's schema constructs with original names (serial keys, an inline reference, a unique defaulted column, an enum column with a default,timestamptz, avarchar[]column, indexes, and a dollar-quoted function) and its get, create, update, and ISBN-update query shapes, asserting the generated enum, row component types, parameter order, and round trips.Scope and non-goals
booktest's title-and-year, tag-overlap, and function-call queries are not reproduced.